import request from '@/config/axios'

export interface StatementDimissionWageVO {
  id: number
  jobNumber: string
  staffName: string
  teamCode: string
  teamName: string
  performanceAssessScore: number
  totalAttendanceSkyNumber: number
  insideFactoryOvertimeHour: number
  dictStaffType: number
  pieceRate: number
  insideFactoryOvertimeWage: number
  leaderSubsidy: number
  rewardsPunishments: number
  totalWage: number
  overtimeSalary: number
  statisticalPeriodStart: string
  statisticalPeriodEnd: string
  dictPost: number
  creatorName: string
  updaterName: string
}

// 查询工资核算-报表查询-离职人员工资汇总列表
export const getStatementDimissionWagePage = async (params) => {
  return await request.get({ url: `/salary/statement-dimission-wage/page`, params })
}

// 查询工资核算-报表查询-离职人员工资汇总详情
export const getStatementDimissionWage = async (id: number) => {
  return await request.get({ url: `/salary/statement-dimission-wage/get?id=` + id })
}

// 新增工资核算-报表查询-离职人员工资汇总
export const createStatementDimissionWage = async (data: StatementDimissionWageVO) => {
  return await request.post({ url: `/salary/statement-dimission-wage/create`, data })
}

// 修改工资核算-报表查询-离职人员工资汇总
export const updateStatementDimissionWage = async (data: StatementDimissionWageVO) => {
  return await request.put({ url: `/salary/statement-dimission-wage/update`, data })
}

// 删除工资核算-报表查询-离职人员工资汇总
export const deleteStatementDimissionWage = async (id: number) => {
  return await request.delete({ url: `/salary/statement-dimission-wage/delete?id=` + id })
}

// 获取工资核算-报表查询-离职人员工资汇总 计件工资和奖惩金额
export const getStatementDimissionWageSalaryAward = async (params) => {
  return await request.get({ url: `salary/statement-dimission-wage/getWages`, params })
}

// 导出工资核算-报表查询-离职人员工资汇总 Excel
export const exportStatementDimissionWage = async (data) => {
  return await request.download({ url: `/salary/statement-dimission-wage/export-excel`, data })
}
